/*
 * 
 *方法的整理与重构
 *
 *
 */
//定义app参数名称，并加载其它模块
/*var authApp=angular.module('authapp', ["ngCookies",'ngFileUpload','ui.bootstrap']);*/

//此为定位页面所用
authApp.value('page','noticePage');


//主要操作controller
authApp.controller("noticeController",function($scope,$http,$getQueryString,$sce){
	//针对此页面需要的参数 should edit
	$scope.pid=$getQueryString("pid");	
	$scope.queryNotice=function(pid){
		$http({
			method:'get',
			url:apis.queryAuthAnnouncementInfoByid,
			params:{'pid':$scope.pid},//！！！should edit
		}).success(function(response){
			if(response.code=="000000"){
				$scope.noticeData=response.data;
				$scope.content= $sce.trustAsHtml(response.data.content);
			}else{
				alert(response.errorMsg);
			}
		}).error(function(){
			alert("网络出现故障，请确认网络是否连接");
		})
	}
	/*
	 * 
	 * 其它操作方法
	 * 
	 */	
	$scope.queryNotice();
	
})

